#ifndef _SERVERSOCKET_H_
#define _SERVERSOCKET_H_

#pragma once
#include "Socket.h"
#include "ClientSocket.h"

enum OptionLevel
{
	TCP
};
enum OptionName
{
	NO_DELAY
};
/*
 * This is an interface to define the basic behaviour of a server socket.
 * Implementation specific code must be placed in classes implementing
 * this interface.
 */
class ServerSocket : public Socket
{
public:
	ServerSocket(const std::string& port);
	virtual ~ServerSocket();

	void doBind();
	void doListen();
	ClientSocket* doAccept();
	void setOption(OptionLevel, OptionName);

private:
	std::string getSocketOptionReadable(int);
	std::string getSocketLevelReadable(int);
	std::string port;
};

#endif
